//
//  ZBTextCell.m
//  XZBProduct
//
//  Created by xzb on 2018/12/25.
//  Copyright © 2018 xzb. All rights reserved.
//

#import "ZBTextCell.h"

#import "ZBTextCellModel.h"

@interface ZBTextCell () 

@property (nonatomic, strong) UILabel *titleLabel;

@end

@implementation ZBTextCell


- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self.contentView addSubview:self.titleLabel];
    }
    return self;
}
- (void)layoutSubviews
{
    [super layoutSubviews];
    
    self.titleLabel.frame = CGRectMake(0, 0, self.contentView.width, self.contentView.height);
    
}
- (void)bindViewModel:(ZBTextCellModel *)viewModel
{
    NSLog(@"%@",viewModel.text);
    self.titleLabel.text = viewModel.text;
    self.contentView.backgroundColor = [UIColor cyanColor];
}

ZBLazyProperty(UILabel, titleLabel);

@end
